<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <p>这是2行1列表格</p>
    <table border="1">
        <tr>
            <td>1</td>
        </tr>
        <tr>
            <td>2</td>
        </tr>
    </table>
    <hr />
    <p>这是1行2列表格</p>
    <table border="1">
        <tr>
            <td>1</td>
            <td>2</td>
        </tr>
    </table>
    <hr />
    <p>这是1行2列表格</p>
    <table border="1">
        <tr>
            <td>1</td>
            <td>2</td>
        </tr>
    </table>
    <hr />
    <p>这是无表头表格</p>
    <table>
        <tr>
            <td>这是表头一</td>
            <td>这是表头二</td>
        </tr>
        <tr>
            <td>这是表格内容一</td>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是垂直表头的表格</p>
    <table>
        <tr>
            <th>这是表头一</th>
            <td>这是表格内容一</td>
        </tr>
        <tr>
            <th>这是表头二</th>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是水平表头的表格</p>
    <table>
        <tr>
            <th>这是表头一</th>
            <th>这是表头二</th>
        </tr>
        <tr>
            <td>这是表格内容一</td>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是加边框的表格</p>
    <table border="1">
        <tr>
            <th>这是表头一</th>
            <th>这是表头二</th>
        </tr>
        <tr>
            <td>这是表格内容一</td>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是粗边框的表格</p>
    <table border="15">
        <tr>
            <th>这是表头一</th>
            <th>这是表头二</th>
        </tr>
        <tr>
            <td>这是表格内容一</td>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是加边框的表格</p>
    <table border="1">
        <tr>
            <th>这是表头一</th>
            <th>这是表头二</th>
        </tr>
        <tr>
            <td>这是表格内容一</td>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是空单元格的表格</p>
    <table border="1">
        <tr>
            <th>这是表头一</th>
            <th>这是表头二</th>
        </tr>
        <tr>
            <td></td>
            <td>这是表格内容二</td>
        </tr>
    </table>
    <hr />
    <p>这是横跨两列表格</p>
    <table border="1">
        <tr>
            <th>姓名</th>
            <th colspan="2">电话</th>
        </tr>
        <tr>
            <td>Bill Gates</td>
            <td>555 77 854</td>
            <td>555 77 855</td>
        </tr>
    </table>
    <hr />
    <p>这是横跨两行表格</p>
    <table border="1">
        <tr>
            <th>姓名</th>
            <td>Bill Gates</td>
        </tr>
        <tr>
            <th rowspan="2">电话</th>
            <td>555 77 854</td>
        </tr>
        <tr>
            <td>555 77 855</td>
        </tr>
    </table>
    <hr />
    <p>表格内的标签</p>
    <table border="1">
        <tr>
            <td>
                <p>这是一个段落。</p>
                <p>这是另一个段落。</p>
            </td>
            <td>这个单元包含一个表格：
                <table border="1">
                    <tr>
                        <td>A</td>
                        <td>B</td>
                    </tr>
                    <tr>
                        <td>C</td>
                        <td>D</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>这个单元包含一个列表：
                <ul>
                    <li>苹果</li>
                    <li>香蕉</li>
                    <li>菠萝</li>
                </ul>
            </td>
            <td>HELLO</td>
        </tr>
    </table>
    <hr />
    <p>带有 cellpadding 的表格</p>
    <table border="1" cellpadding="10">
        <tr>
            <td>First</td>
            <td>Row</td>
        </tr>
        <tr>
            <td>Second</td>
            <td>Row</td>
        </tr>
    </table>
    <hr />
    <p>带有 cellspacing 的表格</p>
    <table border="1" cellspacing="10">
        <tr>
            <td>First</td>
            <td>Row</td>
        </tr>
        <tr>
            <td>Second</td>
            <td>Row</td>
        </tr>
    </table>
    <hr />
    <p>带有背景颜色的表格</p>
    <table border="1" bgcolor="red">
        <tr>
            <td>First</td>
            <td>Row</td>
        </tr>
        <tr>
            <td>Second</td>
            <td>Row</td>
        </tr>
    </table>
    <hr />
    <p>带有背景图片的表格</p>
    <table border="1" background="images/scene.jpg">
        <tr>
            <td>First</td>
            <td>Row</td>
        </tr>
        <tr>
            <td>Second</td>
            <td>Row</td>
        </tr>
    </table>
    <hr />
    <p>单元带有背景颜色和图片的表格</p>
    <table border="1">
        <tr>
            <td bgcolor="red">First</td>
            <td>Row</td>
        </tr>
        <tr>
            <td background="images/scene.jpg">Second</td>
            <td>Row</td>
        </tr>
    </table>
    <hr />
    <p>表格单元中排列内容</p>
    <table width="400" border="1">
        <tr>
            <th align="left">消费项目....</th>
            <th align="right">一月</th>
            <th align="right">二月</th>
        </tr>
        <tr>
            <td align="left">衣服</td>
            <td align="right">$241.10</td>
            <td align="right">$50.20</td>
        </tr>
        <tr>
            <td align="left">化妆品</td>
            <td align="right">$30.00</td>
            <td align="right">$44.45</td>
        </tr>
        <tr>
            <td align="left">食物</td>
            <td align="right">$730.40</td>
            <td align="right">$650.00</td>
        </tr>
        <tr>
            <th align="left">总计</th>
            <th align="right">$1001.50</th>
            <th align="right">$744.65</th>
        </tr>
    </table>
    <hr />
    <p>带 frame 属性的表格。frame 属性无法在 Internet Explorer 中正确地显示。</p>
    <table frame="box">
        <tr>
            <th>Month</th>
            <th>Savings</th>
        </tr>
        <tr>
            <td>January</td>
            <td>$100</td>
        </tr>
    </table>
    <br />
    <table frame="above">
        <tr>
            <th>Month</th>
            <th>Savings</th>
        </tr>
        <tr>
            <td>January</td>
            <td>$100</td>
        </tr>
    </table>
    <br />
    <table frame="below">
        <tr>
            <th>Month</th>
            <th>Savings</th>
        </tr>
        <tr>
            <td>January</td>
            <td>$100</td>
        </tr>
    </table>
    <br />
    <table frame="hsides">
        <tr>
            <th>Month</th>
            <th>Savings</th>
        </tr>
        <tr>
            <td>January</td>
            <td>$100</td>
        </tr>
    </table>
    <br />
    <table frame="vsides">
        <tr>
            <th>Month</th>
            <th>Savings</th>
        </tr>
        <tr>
            <td>January</td>
            <td>$100</td>
        </tr>
    </table>
    <br />
</body>

</html>